package logic

import (
	"log"
)

// Sign 签到接口
type Sign interface {
	// DoSign 签到
	DoSign(uid string) (bool, error)

	// CompensateSign 补签
	CompensateSign(uid string, offset int) (bool, error)

	// SignInfo 查看本月签到情况
	SignInfo(uid string) string
}



// DoSign 多态
func DoSign(sign Sign, uid string)  (bool, error) {
	//log.Println(fmt.Printf("DoSign uid=%s", uid))
	return sign.DoSign(uid)
}
func SignInfo(sign Sign, uid string) string {
	log.Println("SignInfo")
	return sign.SignInfo(uid)
}
func CompensateSign(sign Sign, uid string, offset int) (bool, error) {
	log.Println("DoSign")
	return sign.CompensateSign(uid, offset)
}
